import requests
from src.config import settings

endpoint = 'https://api.together.xyz/inference'
api_token = settings.TOGETHER_AI_TOKEN
res = requests.post(endpoint, json={
    "model": 'togethercomputer/RedPajama-INCITE-7B-Base',
    "prompt": """
        Given a news article, classify its topic.
        Possible labels: 1. World 2. Sports 3. Business 4. Sci/Tech

        Article: A nearby star thought to harbor comets and asteroids now appears to be home to planets, too.
        Label: Sci/Tech

        Article: Soaring crude prices plus worries about the economy and the outlook for earnings are expected to hang over the stock market next week during the depth of the summer doldrums.
        Label: Business

        Article: Murtagh a stickler for success Northeastern field hockey coach Cheryl Murtagh doesn't want the glare of the spotlight that shines on her to detract from a team that has been the America East champion for the past three years and has been to the NCAA tournament 13 times.
        Label: """,
    "top_p": 1,
    "top_k": 40,
    "temperature": 0.8,
    "max_tokens": 1,
    "repetition_penalty": 1,
}, headers={
    "Authorization": f"Bearer {api_token}",
    "User-Agent": "<YOUR_APP_NAME>"
})
print(res.json())
